﻿@model ChiDao.Site.Models.CirculationProcessNewView
@{
    ViewBag.Title = "CirculationProcessNew";
    Layout = "~/Views/Shared/_BaseLayout.cshtml";
    var X = Html.X();
}

<h2>CirculationProcessNew</h2>
@section headtag
{
    <script>
        
    </script>
}
@section example
{
    @(X.Viewport()
        .Layout(LayoutType.Border)
        .Items(
                X.Panel()
                    .Region(Region.North)
                    .Height(100)
                    .Margins("5 5 5 5")
                    .Items(
                        X.Hidden()
                            .ID("hProcessID")
                            .Text(Model.ProcessID),
                        X.Hidden()
                            .ID("hProcessCode")
                            .Text(Model.ProcessCode),
                        X.Hidden()
                            .ID("hCurrentProcessNodeCode")
                            .Text(Model.CurrentProcessNodeCode),
                        X.Hidden()
                            .ID("hProcessPersonCondition")
                            .Text(Model.ProcessPersonCondition),
                        X.Hidden()
                            .ID("hPassNodeList")
                            .Text(Model.PassProcessNodeNewJson),
                        X.GridPanel()
                            .ID("gpCirculationProcessNew")
                            .Region(Region.Center)
                            .Store(X.Store()
                                    .Model(X.Model()
                                        .Fields(
                                                new ModelField("ID", ModelFieldType.String),
                                                new ModelField("NodeCode", ModelFieldType.String),
                                                new ModelField("NodeName", ModelFieldType.String),
                                                new ModelField("DefaultProcessPerson", ModelFieldType.String)
                                                )
                                            )
                                     .DataSource(Model.lstCirculationProcessNodeNew)
                                    )
                            .ColumnModel(
                                            X.Column().Text("下一处理节点").DataIndex("NodeName").Flex(1),
                                            X.Column().Text("处理人员列表").DataIndex("DefaultProcessPerson")
                                         )
                         ),
                X.Panel()
                    .Region(Region.Center)
                    .Height(100)
                    .Margins("5 5 5 5")
                    .Items(
                            X.FormPanel()
                                .Title("审批意见")
                                .BodyPadding(5)
                                .Items(
                                        X.TextArea()
                                            .ID("taApprovalOpinion")
                                            .Height(50)
                                            .AnchorHorizontal("100%")
                                       )
                            ),
                X.Panel()
                    .Region(Region.South)
                    .Margins("5 5 5 5")
                            .Items(
                                X.Button()
                                    .ID("btnConfirm")
                                    .Text("确认")
                                    .X(330)
                                    .DirectEvents(de =>
                                    {
                                        de.Click.Url = Url.Action("SaveCirculationData");
                                        de.Click.ExtraParams.Add(new Parameter("processID", "App.hProcessID.value", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("processCode", "App.hProcessCode.value", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("currentProcessNodeCode", "App.hCurrentProcessNodeCode.value", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("processPersonCondition", "App.hProcessPersonCondition.value", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("circulationDataList", "App.gpCirculationProcessNew.getRowsValues()", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("passNodeList", "App.hPassNodeList.value", ParameterMode.Raw));
                                        de.Click.ExtraParams.Add(new Parameter("approvalOpinion", "App.taApprovalOpinion.value", ParameterMode.Raw));
                                    }),
                                X.Button()
                                    .ID("btnCancel")
                                    .Text("取消")
                                    .X(340)
                                    .Listeners(l => l.Click.Fn = "window.parent.closeCirculationWindow")
                          )
               )
    )
}